<?php
require 'settings.php';
require 'db.php';
?>

<html>
<head>
<title><?php echo $corp_name?> Industry Manager - Add a BPO to library</title>
</head>
<body>
<h1 class=c_page_title>Add an original blueprint to library</h1>
<h2 class="c_step_num">Step 3</h2>

<?php
$bpo_id = $_POST['bpo_id'];
$bpo_me = $_POST['me_val'];
$bpo_pe = $_POST['pe_val'];
$bpo_count = $_POST['count'];

if (0 == $bpo_id )
{
	echo "You must choose a blueprint type!!!";
}
else
{
$bpo_name = "";
$get_bpo_by_id->bind_param( 'i', $bpo_id );
$get_bpo_by_id->bind_result( $bpo_name );
$get_bpo_by_id->execute();
$get_bpo_by_id->fetch();
$get_bpo_category_by_id->close();
$result_string = "BPO: ".$bpo_name." with ME".$bpo_me." and PE".$bpo_pe.". Number of BPOs: ".$bpo_count."<br/>";

$add_bpo_to_library->bind_param( 'iiii', $bpo_id, $bpo_me, $bpo_pe, $bpo_count );

$add_bpo_to_library->execute();
if( 1 == $add_bpo_to_library->affected_rows )
{
		echo "Added ".$result_string;
}
else
{
		echo "Unable to add ".$result_string;
}

}
?>


<br />
<a href="add_bpo_to_library1.php">Back to Step 1</a>
<br />
<a href="index.php">Back to main screen</a>
</body>
</html>
